<?php

Yii::import('application.models._base.BaseCompliance');

class Compliance extends BaseCompliance {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public function rules() {
        return array(
            array('name_of_the_head_of_the_institution, mobile_phone_of_the_head, email_address_of_the_head', 'required', 'on' => 'insert'),
            array('official_phone_number_1,name_of_the_institution, address, district_name, pin_code, name_of_the_head_of_the_institution, mobile_phone_of_the_head, email_address_of_the_head, name_of_the_person_authorized_to_fill_in_this_form, his_her_email_address, his_her_email_mobile, college_type_id, affiliating_university_id, state_id, category_of_institution', 'required', 'on' => 'update'),
            array('college_type_id, affiliating_university_id, state_id', 'numerical', 'integerOnly' => true),
            array('name_of_the_institution', 'length', 'max' => 105),
            array('email_address_of_the_head,his_her_email_address', 'email', 'message' => "Email Address  is not a valid email address."),
            array('address, name_of_the_head_of_the_institution, name_of_the_person_authorized_to_fill_in_this_form', 'length', 'max' => 145),
            array('district_name, pin_code, official_phone_number_1, official_phone_number_2, email_address_of_the_head, additional_email_address, his_her_email_address, his_her_email_mobile, clause_80, category_of_institution, password, name_of_the_egulatory_body', 'length', 'max' => 45),
            array('mobile_phone_of_the_head, additional_mobile_phone, clause_2, clause_3, clause_4, clause_5, clause_6, clause_7, clause_8, clause_9, clause_10, clause_11, clause_12, clause_13, clause_14, clause_15, clause_16, clause_17, clause_18, clause_19, clause_21, clause_22, clause_23, clause_24, clause_25, clause_26, clause_27, clause_28, clause_29, clause_30, clause_31, clause_32, clause_33, clause_34, clause_35, clause_36, clause_37, clause_38, clause_39, clause_40, clause_41, clause_42, clause_43, clause_44, clause_45, clause_46, clause_47, clause_48, clause_49, clause_50, clause_51, clause_52, clause_53, clause_54, clause_55, clause_56, clause_57, clause_58, clause_59, clause_60, clause_61, clause_62, clause_63, clause_64, clause_65, clause_66, clause_67, clause_68, clause_69, clause_70, clause_71, clause_72, clause_73, clause_74, clause_75, clause_76, clause_77, clause_78, clause_79, clause_20', 'length', 'max' => 15),
            array('clause_1', 'length', 'max' => 10),
            array('official_phone_number_1, official_phone_number_2, additional_mobile_phone, additional_email_address, clause_1, clause_2, clause_3, clause_4, clause_5, clause_6, clause_7, clause_8, clause_9, clause_10, clause_12, clause_13, clause_14, clause_15, clause_16, clause_17, clause_18, clause_19, clause_21, clause_22, clause_23, clause_24, clause_25, clause_26, clause_27, clause_28, clause_29, clause_30, clause_31, clause_32, clause_33, clause_34, clause_35, clause_36, clause_37, clause_38, clause_39, clause_40, clause_41, clause_42, clause_43, clause_44, clause_45, clause_46, clause_47, clause_48, clause_49, clause_50, clause_51, clause_52, clause_53, clause_54, clause_55, clause_56, clause_57, clause_58, clause_59, clause_60, clause_61, clause_62, clause_63, clause_64, clause_65, clause_66, clause_67, clause_68, clause_69, clause_70, clause_71, clause_72, clause_73, clause_74, clause_75, clause_76, clause_77, clause_78, clause_79, clause_80, password, name_of_the_egulatory_body', 'default', 'setOnEmpty' => true, 'value' => null),
            array('id, name_of_the_institution, address, district_name, pin_code, name_of_the_head_of_the_institution, official_phone_number_1, official_phone_number_2, mobile_phone_of_the_head, additional_mobile_phone, email_address_of_the_head, additional_email_address, name_of_the_person_authorized_to_fill_in_this_form, his_her_email_address, his_her_email_mobile, clause_1, clause_2, clause_3, clause_4, clause_5, clause_6, clause_7, clause_8, clause_9, clause_10, clause_11, clause_12, clause_13, clause_14, clause_15, clause_16, clause_17, clause_18, clause_19, clause_21, clause_22, clause_23, clause_24, clause_25, clause_26, clause_27, clause_28, clause_29, clause_30, clause_31, clause_32, clause_33, clause_34, clause_35, clause_36, clause_37, clause_38, clause_39, clause_40, clause_41, clause_42, clause_43, clause_44, clause_45, clause_46, clause_47, clause_48, clause_49, clause_50, clause_51, clause_52, clause_53, clause_54, clause_55, clause_56, clause_57, clause_58, clause_59, clause_60, clause_61, clause_62, clause_63, clause_64, clause_65, clause_66, clause_67, clause_68, clause_69, clause_70, clause_71, clause_72, clause_73, clause_74, clause_75, clause_76, clause_77, clause_78, clause_79, clause_80, clause_20, college_type_id, affiliating_university_id, state_id, category_of_institution, password, name_of_the_egulatory_body', 'safe', 'on' => 'search'),
        );
    }

    public function categoryofInstitution() {
        return array('Affiliated' => 'Affiliated', 'Constituent College ' => 'Constituent College', 'Deemed University' => 'Deemed University');
    }

    public function regulartyBody() {
        return array('MCI' => 'MCI', 'AICTE ' => 'AICTE', 'UGC' => 'UGC');
    }

}
